<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Merchant/index')}">商户列表</a></li>
			<li><a href="{:U('Merchant/add')}">添加商户</a></li>
		</ul>
		<form class="well form-search" method="post" action="{:U('Merchant/index')}">
			商户名称:
			<input type="text" name="name" style="width: 130px;" value="{:I('request.name/s','')}" placeholder="请输入商户名称">
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:U('Merchant/index')}">清空</a>
		</form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>商户名称</th>
					<th>商户logo</th>
					<th>所在区域</th>
					<th>商户类型</th>
					<th>简介</th>
					<th width="50">{:L('STATUS')}</th>
					<th width="100">{:L('ACTIONS')}</th>
				</tr>
			</thead>
			<style>td{word-break:break-all;}</style>
			<tbody>
				<php>
					$merchant_statuses=array("0"=>禁用,"1"=>启用);
					$banner_type=array("index"=>"首页轮播图","shop_discount"=>"店铺优惠轮播图");
				</php>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.name}</td>
					<td><a href="<php>echo '/'.C('UPLOADPATH').$vo['logo']</php>" target="_blank">点击查看</a></td>
					<td>{$vo.area}</td>
					<td>{$vo.type_id}</td>
					<td>{$vo.intro}</td>
					<td>{$merchant_statuses[$vo['use_flg']]}</td>
					<td>
						<a href='{:U("Merchant/edit",array("id"=>$vo["id"]))}'>{:L('EDIT')}</a> |
						<a class="js-ajax-delete" href="{:U('Merchant/delete',array('id'=>$vo['id']))}">{:L('DELETE')}</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>